// 代码的封装，将登录时手机号密码的校验规则单独抽离出来，保证了代码的可读性、维护性、复用性
const mobileRules = [
  { required: true, message: '请输入手机号!' },
  { pattern: /^1[3-9]\d{9}$/, message: '手机号格式错误！' }
]
const passwordRules = [
  { required: true, message: '请输入密码!' },
  { pattern: /^\w{8,24}$/, message: '密码格式错误！' }
]
const codeRules = [
  { required: true, message: '请输入验证码' },
  { pattern: /^\d{6}$/, message: '验证码6个数字' }
]
export { mobileRules, passwordRules, codeRules }
